package com.sina.shop.service.goods;

import com.sina.shop.core.BaseService;
import com.sina.shop.core.exception.client.DataException;
import com.sina.shop.core.exception.server.CreateException;
import com.sina.shop.core.exception.server.ResourceExistsException;
import com.sina.shop.core.exception.server.UpdateException;
import com.sina.shop.domain.goods.Goods;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * 段浩杰   2018-02-06-10:47
 */
public interface GoodsService extends BaseService {

    //得到商品列表  用于查询
    List<Goods> getGoodsList(Goods goods, Long[] count);

    Goods getGoods(Long id);

    //根据id删除商品
    Integer deleteGoods(Long id) throws DataException, UpdateException;

    Goods saveGoods(Goods goods) throws CreateException, ResourceExistsException, DataException;

    Goods updateGoods(Goods goods) throws UpdateException, DataException;
}
